#include "stdafx.h"
#include <stdlib.h>
#include "position.h"

using namespace std; 

inline bool Position::isEmpty() {
    return _isEmpty;
}

inline bool Position::isBlack() {
    return _color;
}

void Position::setEmpty() {
    _isEmpty = true;
}

void Position::setBlack() {
    _isEmpty = false;
    _color = BLACK;
}

void Position::setWhite() {
    _isEmpty = false;
    _color = WHITE;
}

int Position::getLabel() {
    return _label;
}

void Position::setLabel(int label) {
    _label = label;
}

void Position::setAlive(bool alive) {
	_isAlive = alive;
}

bool Position::isAlive() {
    return _isAlive;
}

Position& Position::operator=(Position& pos) {
	_isEmpty = pos.isEmpty();
	_color = pos.isBlack();
	return *this;
}

bool Position::operator ==(Position& pos) {
	if(_isEmpty == pos.isEmpty() == 1) 
		return true;
	return _color == pos.isBlack();
}
